<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        li{
            width: 100px;
            height: 100px;
            list-style: none;
        }
        ul{
            width: 300px;
            height: 300px;
            border:3px solid red;
            display: flex;
        }
    </style>
</head>
<body>
    <ul class="uul"></ul>
    <button id="but">点击</button>
</body>
</html>
<script src="../day01/js/lodash.js"></script>
<script src="../案例/随机颜色.js"></script>
<script>
    const uul = document.querySelector('.uul')
    const but = document.querySelector('#but')
    // function fn(){
    //     let r = _.random(0,255)
    //     let g = _.random(0,255)
    //     let b = _.random(0,255)
    //     const li = document.createElement('li')
    //     uul.appendChild(li)
    //     li.style.background =  `rgb(${r},${g},${b})`
    // }
    // but.onclick = function(){
    //     fn()
    // }
    const Color = () => {
        const li = document.createElement('li')
        uul.appendChild(li)
        li.style.background = `${fn1()}`
    } 
    but.onclick = () => {
        Color()
    }
    console.log(`${fn1()}`);
</script>